home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus Special 24
/
AMIGAplus Sonderheft 24 (2000)(Falke)(DE)[!].iso
/
PublicDomain
/
Anwendungen
/
Identify
/
developer
/
identify.doc
< prev
next >
Wrap
Text File
|
1999-04-22
|
28KB
|
832 lines
TABLE OF CONTENTS
identify.library/IdAlert
identify.library/IdEstimateFormatSize
identify.library/IdExpansion
identify.library/IdFormatString
identify.library/IdFunction
identify.library/IdHardware
identify.library/IdHardwareNum
identify.library/IdHardwareUpdate
identify.library/IdAlert
NAME
IdAlert - get description of an alert (V3)
SYNOPSIS
Error = IdAlert(Code,TagList)
D0.l D0.l A0.l
LONG IdAlert(ULONG, struct TagItem *);
Error = IdAlertTags(Code,Tag1,...)
LONG IdAlertTags(ULONG, ULONG,...);
FUNCTION
Get a human readable description of the alert ('Guru') code.
INPUTS
Code -- (ULONG) alert code, as defined in exec/alerts.h
TagList -- (struct TagItem *) tags that describe further
options.
RESULT
Error -- (LONG) error code, or 0 if everything went fine.
TAGS
IDTAG_DeadStr -- (STRPTR) Alert type string (deadend or
recoverable). You may skip this tag if you do not want to get
the string.
IDTAG_SubsysStr -- (STRPTR) String of the subsystem that caused
the alert (CPU, exec.library, ...). You may skip this tag if you
do not want to get the string.
IDTAG_GeneralStr -- (STRPTR) General alert cause. You may skip
this tag if you do not want to get the string.
IDTAG_SpecStr -- (STRPTR) Specified alert cause. You may skip
this tag if you do not want to get the string.
IDTAG_StrLength -- (UWORD) Maximum length of the string buffer,
including termination. Defaults to 50.
IDTAG_Localize -- [V8] (BOOL) FALSE to get English strings
only, TRUE for localized strings. This is useful for applications
with English as only language. Defaults to TRUE.
NOTE
This call is guaranteed to preserve all registers except D0.
BUGS
SEE ALSO
identify.library/IdEstimateFormatSize
NAME
IdEstimateFormatSize - estimate size of a format buffer (V11)
SYNOPSIS
Length = IdEstimateFormatSize(String,Tags)
D0.l A0.l A1.l
ULONG IdEstimateFormatSize(STRPTR, struct TagItem *);
Length = IdEstimateFormatSizeTags(String,Tag1,...)
ULONG IdEstimateFormatSizeTags(STRPTR,ULONG,...);
FUNCTION
Estimates the size of the buffer that will contain the output
of the format string when used on IdFormatString().
INPUTS
String -- (STRPTR) Format string
Tags -- (struct TagItem *) Tags, currently NULL or
TAG_DONE.
RESULT
Length -- (ULONG) Length of the buffer size that will
be able to hold the entire result.
NOTE
The returned size will be large enough to contain the result
of a IdFormatString(). It is not necessarily the size of the
resulting buffer (the result length of IdFormatString()).
This call is guaranteed to preserve all registers except D0.
BUGS
SEE ALSO
IdHardware(), IdFormatString()
identify.library/IdExpansion
NAME
IdExpansion - get name of expansion board (V3)
SYNOPSIS
Error = IdExpansion(TagList)
D0.l A0.l
LONG IdExpansion(struct TagItem *);
Error = IdExpansionTags(Tag1,...)
LONG IdExpansionTags(ULONG,...);
FUNCTION
Gets the name and class of the expansion and it's manufacturer.
INPUTS
TagList -- (struct TagItem *) tags that describe further
options.
RESULT
Error -- (LONG) error code, or 0 if everything went fine.
IDERR_NOLENGTH -- IDTAG_StrLength has been set to 0!
IDERR_BADID -- IDTAG_ManufID and IDTAG_ProdID were
out of range or one of them was missing.
IDERR_DONE -- Checked all expansions using the
IDTAG_Expansion tag. This is not really an error.
IDERR_SECONDARY -- This expansion is secondary to a primary
expansion entry.
TAGS
IDTAG_ConfigDev -- (struct ConfigDev *) ConfigDev structure
containing all information. You should use this tag if ever
possible, since there are more possibilities to recognize and
distinguish between a board.
IDTAG_ManufID -- (UWORD) Manufacturer ID if ConfigDev is not
provided. You must also provide IDTAG_ProdID!
IDTAG_ProdID -- (UBYTE) Product ID if ConfigDev is not
provided. You must also provide IDTAG_ManufID!
IDTAG_ManufStr -- (STRPTR) Pointer to a buffer space for the
manufacturer name. You may skip this tag if you do not want
to get this string.
IDTAG_ProdStr -- (STRPTR) Pointer to a buffer space for the
product name. You may skip this tag if you do not want to get
this string.
IDTAG_ClassStr -- (STRPTR) Pointer to a buffer space for the
product class. You may skip this tag if you do not want to get
this string.
IDTAG_StrLength -- (UWORD) Buffer length, including
termination. Defaults to 50.
IDTAG_Expansion -- [V6] (struct ConfigDev **) Use this tag to
easily traverse through the expansion board list. Init the
pointed variable with NULL. After each call, you will find
the current ConfigDev pointer in this variable. If you are
done, this function returns IDERR_DONE and the variable is set
to NULL. See example.
IDTAG_Secondary -- [V7] (BOOL) If set to TRUE, identify will
warn about secondary expansions. E.g. some graphic boards
create more than one entry in the expansion list. Then, one
entry is the primary entry, and any additional are secondary.
This tag does only make sense when checking all mounted
expansions. Defaults to FALSE. (See Bugs)
IDTAG_ClassID -- [V8] (ULONG *) The ULONG field will be filled
with a numerical class ID of the expansion (see include file:
IDCID_...). IMPORTANT: You MUST be prepared to get a number
that does not match to any IDCID value. In this case, assume
IDCID_MISC.
IDTAG_Localize -- [V8] (BOOL) FALSE to get English strings
only, TRUE for localized strings. This is useful for applications
with English as only language. Defaults to TRUE.
EXAMPLE
To check all expansion boards, you may use this code:
void PrintExpansions(void)
{
struct ConfigDev *expans = NULL;
char manuf[IDENTIFYBUFLEN];
char prod[IDENTIFYBUFLEN];
char pclass[IDENTIFYBUFLEN];
while(!IdExpansionTags(
IDTAG_ManufStr ,manuf,
IDTAG_ProdStr ,prod,
IDTAG_ClassStr ,pclass,
IDTAG_Expansion,&expans,
TAG_DONE))
{
Printf("Current ConfigDev = 0x%08lx\n",expans);
Printf(" Manufacturer = %s\n",manuf);
Printf(" Product = %s\n",prod);
Printf(" Expansion class = %s\n\n",class);
}
}
NOTE
If the manufacturer or the product is not known, the string will be
filled with its number.
This call is guaranteed to preserve all registers except D0.
BUGS
You must also provide IDTAG_ProdStr if you want to use IDTAG_Secondary.
There are by far not all existing boards implemented. Please send
the manufacturer id and name and the products id, name and class
o